package com.jxmcloud.business.cut.model.database;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jxmcloud.business.cut.handler.IntegerArrayTypeHandler;
import com.xlcloud.platform.util.DateUtil;
import lombok.Builder;
import lombok.Data;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;


/**
 * 用户背包信息 实体类
 */
@Data
@Builder
@TableName("user_activity_info")
public class DBUserActivityInfo {
    //主键ID
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    //用户玄乐id
    @TableField("`uid`")
    private Integer uid;
    //活动id
    @TableField("`activity_id`")
    private Integer activityId;
    //活动开始id
    @TableField("`activity_start_id`")
    private Integer activityStartId;
    //是否完成观看直播：1 是  0 否
    @TableField("`watch_live`")
    private Integer watchLive;
    //是否获取奖励：1 是 0否
    @TableField("`gain_prize`")
    private Integer gainPrize;
    //创建时间
    @TableField("`create_time`")
    @DateTimeFormat(pattern = DateUtil.FMT_YYYYMMDD_HHmmss_ZG)
    @JsonFormat(pattern = DateUtil.FMT_YYYYMMDD_HHmmss_ZG, timezone = DateUtil.TZ_GMT8)
    @JSONField(format = DateUtil.FMT_YYYYMMDD_HHmmss_ZG)
    private Date createTime;

    //'活动状态 -1：终止 0：开始  1：结束'
    @TableField("`status`")
    private Integer status;

    @TableField("`image_url`")
    private String imageUrl;

    @TableField(value = "`notice`", typeHandler = IntegerArrayTypeHandler.class)
    private Integer[] notice;

    @TableField("`new_user_count`")
    private Integer newUserCount;
    //分享次数
    @TableField("`share_count`")
    private Integer shareCount;

    //有效时间刷新开始时间
    @TableField("`began_time`")
    @DateTimeFormat(pattern = DateUtil.FMT_YYYYMMDD_HHmmss_ZG)
    @JsonFormat(pattern = DateUtil.FMT_YYYYMMDD_HHmmss_ZG, timezone = DateUtil.TZ_GMT8)
    @JSONField(format = DateUtil.FMT_YYYYMMDD_HHmmss_ZG)
    private Date beganTime;
}
